package com.yunqing.restkeeper.store.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName Dish
 * @Description 菜品
 * @author: puyunqing
 * @Date: 2025/7/23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Schema(name = "Dish", description = "菜品")
@TableName(value = "t_dish", resultMap = "BaseResultMap")
public class Dish extends BaseStoreEntity implements Serializable {

    @Schema(name = "id", description = "菜品id")
    @TableId(value = "dish_id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(name = "name", description = "菜品名称")
    @TableField(value = "dish_name")
    private String name;

    @Schema(name = "categoryId", description = "分类id")
    @TableField(value = "category_id")
    private String categoryId;

    @Schema(name = "price", description = "价格")
    @TableField(value = "price")
    private Integer price;

    @Schema(name = "code", description = "菜品code")
    @TableField(value = "code")
    private String code;

    @Schema(name = "image", description = "图片路径")
    @TableField(value = "image")
    private String image;

    @Schema(name = "description", description = "备注")
    @TableField(value = "description")
    private String description;

    @Schema(name = "status", description = "状态")
    @TableField(value = "status")
    private Integer status;

    @Schema(name = "dishCategory", description = "所属分类对象")
    @TableField(exist = false)
    private DishCategory dishCategory;

    @Schema(name = "flavorList", description = "口味列表")
    @TableField(exist = false)
    private List<DishFlavor> flavorList;
}
